package lab03.test01;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by 星月 on 2017/11/16.
 */
public class Test02 {
    public static void main(String[] args) {
        //字符流 读文件
        String path="F:\\桌面东西\\sctu-web-2017-3\\1606101096李星月\\src\\3.3.html";
        BufferedReader reader=null;//初始值为空
        try {
            reader=new BufferedReader(new FileReader(path));
            String line=null;

            //出错时按alt+enter 选择第一个错
            while ((line=reader.readLine())!=null){
                System.out.println(line);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                reader.close();//按alt+entr选择surround cry/catch
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
